package com.nowcoder.community.dao;

import com.nowcoder.community.entity.User;
import org.apache.ibatis.annotations.Mapper;


@Mapper
public interface UserMapper {
    /**
     * 根据id搜索用户
     * @param id
     * @return
     */
    User selectUserById(int id);

    /**
     *
     * @param name
     * @return
     */
    User selectUserByName(String name);


    /**
     *
     * @param email
     * @return
     */
    User selectUserByEmail(String email);

    /**
     * 插入用户
     * @param user
     * @return
     */
    int insertUser(User user);

    int  updateStatus(int id, int status);

    int updateHeader(int id, String headerUrl);

    int updatePassword(int id, String password);

}
